import BaseCURDV2Api from '@/framework/infra/base/BaseCURDV2Api'

class LogInfoApi extends BaseCURDV2Api{
  constructor() {
    super('mgr/operation-log')
  }

  async list(params) {
    const getParams = { ...params }
    Object.keys(getParams).forEach(key => {
      if (Array.isArray(getParams[key])) {
        getParams[key] = getParams[key].join(',')
      }
    })
    const data = await this.get('list-page', getParams)
    return data
  }
}

export const logInfoApi = new LogInfoApi()
